package li.rafa.UrlShortener.server;

import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManager;
import javax.jdo.PersistenceManagerFactory;

public final class PMF {
    private static final PersistenceManagerFactory pmfInstance =
        JDOHelper.getPersistenceManagerFactory("transactions-optional");

     public static PersistenceManager getPM() {
    	 PersistenceManager pm = pmfInstance.getPersistenceManager();
    	 pm.getFetchPlan().setMaxFetchDepth(-1);
//    	 pm.setDetachAllOnCommit(true);
    	 return pm;
     }
}